/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sim.models;

import com.jme3.app.Application;

/**
 *
 * @author Ahmed
 */
public class ModelFactory {
    public static final String[] MODELS = new String[]{"Golem", "Sinbad"};
    
    public static BaseModel getModel(Application app, int index) {
        if (index < 0) index = -index;
        return getModel(app, MODELS[index % MODELS.length]);
    }
    
    public static BaseModel getModel(Application app, String modelName) {
        if ("Golem".equals(modelName)) {
            return new GolemModel(app);
        } else if ("Sinbad".equals(modelName)) {
            return new SinbadModel(app);
        } else {
            throw new RuntimeException("Unknown model: " + modelName);
        }
    }
}
